package com.demo.hxs.controller;

import com.demo.hxs.service.ExcelExportToConsoleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class ExcelExportToConsoleController {
    @Resource
    private ExcelExportToConsoleService excelExportToConsoleService;

    @GetMapping("/processExcel")
    public String processExcel() throws InterruptedException{
        excelExportToConsoleService.exportToConsole();
        return "利用多线程加速打印excel中数据到控制台成功";
    }

    @GetMapping("/processExcel1")
    public String processExcel1(){
        excelExportToConsoleService.export();
        return "打印excel中数据到控制台成功";
    }
}
